package com.dz.scrm.app.config

import okhttp3.Interceptor
import okhttp3.Response

/**
 * 作者：fanda
 * 日期：2021/4/21 16:50
 * 描述：各种拦截器配置
 */

class  webSocketInterceptor : Interceptor{
    override fun intercept(chain: Interceptor.Chain): Response {
        //  配置请求头
        val request = chain.request().newBuilder()
                .header("Content-Type", "application/json")
//                .header("Accept", "application/json")
//                .addHeader("Connection", "Keep-Alive")
//                .addHeader("Accept-Encoding", "gzip")
                .addHeader("Dz-Auth", "Basic Y3JtOmNybV9zZWNyZXQ=")
                .build()
        return chain.proceed(request)
    }
}